import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;

import org.springdoc.core.annotations.ParameterObject;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import jakarta.validation.Valid;
import java.util.List;

/**
 * ${TableComment}
 *
 * @author ${Author}  ${Email}
 * @since  ${DateTime}
 */
@RestController
@RequestMapping("${TableName}")
public class ${ClassName}Controller {

    /**
     * 查询
     *
     * @param id
     * @return
     */
    @ApiOperation(value = "查询", notes = "查询详情")
    @ApiResponses({@ApiResponse(code = 200, message = "查询成功")})
    @GetMapping("/{id}")
    public Result<User> findById(@PathVariable("id") Long id) {
     User user = userService.findById(id);
     return ResponseEntity.ok(user);
    }

}